<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%
	String cookieName = "AirportUser";
	Cookie cookies[] = request.getCookies();
	System.out.println("going to find cookie");
	String username = null;
	if (cookies != null) {
		for (int i = 0; i < cookies.length; i++) {
			if (cookies[i].getName().equals(cookieName)) {
				username = cookies[i].getValue();
				System.out.println(username);
				System.out.println("finding cookie");
				break;
			}
		}
	}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Password Request</title>
</head>
<body><h1>An email regarding to your password has been sent out.</h1><br>
This page will automatically redirect to front page for you to login <span id="time" style="background:red">5</span>seconds later, if it doesn't redirect, please click

<script language="JavaScript1.2" type="text/javascript">
<!--
//  Place this in the 'head' section of your page.  test

function delayURL(url) {
    var delay = document.getElementById("time").innerHTML;
//alert(delay);
    if(delay > 0) {
        delay--;
        document.getElementById("time").innerHTML = delay;
    } else {
        window.top.location.href = url;
    }
    setTimeout("delayURL('" + url + "')", 1000); //delayURL(http://www.chenfy.com)
}

//-->

</script>

<a href="index.action">here</a>
<script type="text/javascript">
    delayURL("index.action");
</script>
</body>
</html>